package com.kingdee.eas.xr.helper;

/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.


import com.kingdee.bos.ctrl.kdf.table.IColumn;
import java.util.HashMap;
import java.util.Map;

// Referenced classes of package com.kingdee.eas.ec.common.client:
//            EcBaseRender

public class EcRenderUtil
{

    public EcRenderUtil()
    {
    }

//    public static void setRender(IColumn col, String style)
//    {
//        col.setRenderer(new XRBillBaseRender(style));
//    }

    public static String getDecimalFormat(int scale)
    {
        String formatStr = null;
        String scaleStr = String.valueOf(scale);
        formatStr = (String)formatMap.get(scaleStr);
        if(null == formatStr)
        {
            StringBuffer sb = new StringBuffer("");
            StringBuffer fsb = new StringBuffer("-");
            sb.append("#,##");
            fsb.append("#,##");
            sb.append("0");
            fsb.append("0");
            if(scale > 0)
            {
                sb.append(".");
                fsb.append(".");
                for(int i = 0; i < scale; i++)
                {
                    sb.append("0");
                    fsb.append("0");
                }

            }
            sb.append(";");
            sb.append(fsb);
            formatStr = sb.toString();
            formatMap.put(scaleStr, formatStr);
        }
        return formatStr;
    }

    public static String getDecimalFormat2(int scale)
    {
        String formatStr = null;
        String scaleStr = String.valueOf(scale);
        formatStr = (String)formatMap.get(scaleStr);
        if(null == formatStr)
        {
            StringBuffer sb = new StringBuffer("");
            StringBuffer fsb = new StringBuffer("-");
            sb.append("#,##");
            fsb.append("#,##");
            sb.append("0");
            fsb.append("0");
            if(scale > 0)
            {
                sb.append(".");
                fsb.append(".");
                for(int i = 0; i < scale; i++)
                {
                    sb.append("0");
                    fsb.append("0");
                }

            }
            sb.append(";");
            sb.append(fsb);
            formatStr = sb.toString();
            formatMap.put(scaleStr, formatStr);
        }
        return formatStr;
    }

    private static final Map formatMap = new HashMap();

}


/*
	DECOMPILATION REPORT

	Decompiled from: F:\qs\lib\client\industry\ec_common-client.jar
	Total time: 0 ms
	Jad reported messages/errors:
	Exit status: 0
	Caught exceptions:
*/